from selenium import webdriver
import time

file_path = 'D:/project/python100/Day48/selenium.html'
driver = webdriver.Chrome()
driver.get(file_path)
driver.maximize_window()

driver.find_element_by_name('username').send_keys('rabbit')
time.sleep(3)
driver.find_element_by_name('password').send_keys('love')
time.sleep(3)
driver.find_element_by_id('sub').click()
driver.switch_to.alert.accept()
time.sleep(3)

driver.close()
driver.quit()


